package com.example.bijiabao.mapper;

import com.example.bijiabao.entity.user;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface usercenterMapper {
    @Select("select userID,userName,phone,email,birthday,password from user where userName=#{userName}")
    user SelectUser(String userName);

    @Update("update user set userName=#{userName},password=#{password},phone=#{phone},email=#{email},birthday=#{birthday} where userID=#{userID}")
    Integer UpdateUser(user user);

    @Update("update user set password=#{password} where userName=#{userName}")
    Integer ResetUserPassWord(String userName,String password);

    @Select("select password from user where userName=#{userName}")
    String checkPassword(String userName);
}
